#include "error.h"
#include "sys.h"
void sys_error_func(void)
{
    static u8 __xdata tempFaultCnt;
    
    if(sysParams.regs.temperatureSmp == 0xFF)
    {
        tempFaultCnt++;
        if(tempFaultCnt >= 2)
        {
            sysParams.regs.powerStatus = 0;
            sysParams.Fault = FAULT_TYPE_SENSOR;
            sysParams.presentPage = PAGE_ERROR;
        }
    }
    else
    {
        tempFaultCnt = 0;
    }
}